<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: commands.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">commands.h</div>  </div>
</div>
<div class="contents">
<a href="commands_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00025"></a>00025 <span class="preprocessor">#ifndef COMMANDS_H_</span>
<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define COMMANDS_H_</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="comment">// Definition structure of commands</span>
<a name="l00030"></a><a class="code" href="structcommand__structure.html">00030</a> <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keyword">struct </span>{
<a name="l00031"></a><a class="code" href="structcommand__structure.html#a448f375c590f94439eeed8c3287a1119">00031</a>         uint8_t <a class="code" href="structcommand__structure.html#a448f375c590f94439eeed8c3287a1119">header</a>;
<a name="l00032"></a><a class="code" href="structcommand__structure.html#aebeb85ab86cf52981c2294e0ff785717">00032</a>         void (*cmd_response)(uint8_t**);
<a name="l00033"></a><a class="code" href="structcommand__structure.html#a4e170d613deb0c63c5f6053aa4dfc257">00033</a>         uint8_t <a class="code" href="structcommand__structure.html#a4e170d613deb0c63c5f6053aa4dfc257">nrb_payload</a>;
<a name="l00034"></a><a class="code" href="structcommand__structure.html#a6ea64013ccdb9f90c0b39d9103c93892">00034</a>         uint8_t <a class="code" href="structcommand__structure.html#a6ea64013ccdb9f90c0b39d9103c93892">nr_fields</a>;
<a name="l00035"></a><a class="code" href="structcommand__structure.html#ac385bdc4001624f566e66b09e7dedcd3">00035</a>         uint8_t field_widths[];
<a name="l00036"></a>00036 } <a class="code" href="structcommand__structure.html">command_structure</a>;
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="comment">// Command response functions</span>
<a name="l00039"></a>00039 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#ga0c546b02615dc75cdf2385651cc823ce">retransmit_header</a>(uint8_t**);
<a name="l00040"></a>00040 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#ga63c90fa711213e6746dc061226580e1a">retransmit_command_info</a>(uint8_t**);
<a name="l00041"></a>00041 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#ga154e99940eadddeab0a978ebaaf4af29">output_state</a>(uint8_t**);
<a name="l00042"></a>00042 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#gaf49fcc59b85d00300cceac3381af50ac">turn_off_output</a>(uint8_t**);
<a name="l00043"></a>00043 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#ga144f167d203bfaa934388244862c2e66">get_mcu_serial</a>(uint8_t**);
<a name="l00044"></a>00044 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#ga18b9c076238f0421e0c613aba24c1e96">toggle_inertial_output</a>(uint8_t**);
<a name="l00045"></a>00045 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#gade63f6b7485456459a562107079a76a8">position_plus_zupt</a>(uint8_t**);
<a name="l00046"></a>00046 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#ga73d5a4fdd7dbdf0707007e03b69dd7aa">output_navigational_states</a>(uint8_t**);
<a name="l00047"></a>00047 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#ga2f8eeda3ee360ccf29e05fbfda016f47">processing_onoff</a>(uint8_t**);
<a name="l00048"></a>00048 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#gae59981ff1a5486c063329824f812d6ef">reset_zupt_aided_ins</a>(uint8_t**);
<a name="l00049"></a>00049 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#ga208e711393802848a2f84f913ef3cb84">gyro_self_calibration</a>(uint8_t**);
<a name="l00050"></a>00050 <span class="keywordtype">void</span> <a class="code" href="group__tables.html#ga29fdeaec38ab911e7c4a5ffd19dc178d">acc_calibration</a>(uint8_t **);
<a name="l00051"></a>00051 
<a name="l00052"></a>00052 <span class="comment">// Definition of received commands</span>
<a name="l00053"></a>00053 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> only_ack = {0x01,NULL,0,0,{0}};
<a name="l00054"></a>00054 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> mcu_id = {0x02,&amp;<a class="code" href="group__tables.html#ga144f167d203bfaa934388244862c2e66">get_mcu_serial</a>,0,0,{0}};
<a name="l00055"></a>00055 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> header_info = {0x03,&amp;<a class="code" href="group__tables.html#ga63c90fa711213e6746dc061226580e1a">retransmit_command_info</a>,1,1,{1}};
<a name="l00056"></a>00056 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> command4 = {0x04,&amp;<a class="code" href="group__tables.html#ga0c546b02615dc75cdf2385651cc823ce">retransmit_header</a>,4,2,{2,2}};
<a name="l00057"></a>00057 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> output_onoff_state = {0x20,&amp;<a class="code" href="group__tables.html#ga154e99940eadddeab0a978ebaaf4af29">output_state</a>,2,2,{1,1}};
<a name="l00058"></a>00058 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> output_all_off = {0x21,&amp;<a class="code" href="group__tables.html#gaf49fcc59b85d00300cceac3381af50ac">turn_off_output</a>,0,0,{0}};
<a name="l00059"></a>00059 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> output_onoff_inert = {0x22,&amp;<a class="code" href="group__tables.html#ga18b9c076238f0421e0c613aba24c1e96">toggle_inertial_output</a>,1,1,{1}};
<a name="l00060"></a>00060 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> output_position_plus_zupt = {0x23,&amp;<a class="code" href="group__tables.html#gade63f6b7485456459a562107079a76a8">position_plus_zupt</a>,1,1,{1}};
<a name="l00061"></a>00061 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> output_navigational_states_cmd = {0x24,&amp;<a class="code" href="group__tables.html#ga73d5a4fdd7dbdf0707007e03b69dd7aa">output_navigational_states</a>,1,1,{1}};
<a name="l00062"></a>00062 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> processing_function_onoff = {0x30,&amp;<a class="code" href="group__tables.html#ga2f8eeda3ee360ccf29e05fbfda016f47">processing_onoff</a>,3,3,{1,1,1}};
<a name="l00063"></a>00063 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> reset_system_cmd = {0x10,&amp;<a class="code" href="group__tables.html#gae59981ff1a5486c063329824f812d6ef">reset_zupt_aided_ins</a>,0,0,{0}};
<a name="l00064"></a>00064 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> gyro_calibration_cmd = {0x11,&amp;<a class="code" href="group__tables.html#ga208e711393802848a2f84f913ef3cb84">gyro_self_calibration</a>,0,0,{0}};
<a name="l00065"></a>00065 <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a> acc_calibration_cmd = {0x12,&amp;<a class="code" href="group__tables.html#ga29fdeaec38ab911e7c4a5ffd19dc178d">acc_calibration</a>,1,1,{1}};
<a name="l00066"></a>00066 
<a name="l00067"></a>00067 <span class="comment">// Arrays/tables to find appropriate commands</span>
<a name="l00068"></a>00068 <span class="keyword">const</span> <span class="keyword">static</span> <a class="code" href="structcommand__structure.html">command_structure</a>* commands[] = {&amp;only_ack,
<a name="l00069"></a>00069                                                                                                   &amp;mcu_id,
<a name="l00070"></a>00070                                                                                                   &amp;header_info,
<a name="l00071"></a>00071                                                                                                   &amp;command4,
<a name="l00072"></a>00072                                                                                                   &amp;output_onoff_state,
<a name="l00073"></a>00073                                                                                                   &amp;output_all_off,
<a name="l00074"></a>00074                                                                                                   &amp;output_onoff_inert,
<a name="l00075"></a>00075                                                                                                   &amp;output_position_plus_zupt,
<a name="l00076"></a>00076                                                                                                   &amp;output_navigational_states_cmd,
<a name="l00077"></a>00077                                                                                                   &amp;processing_function_onoff,
<a name="l00078"></a>00078                                                                                                   &amp;reset_system_cmd,
<a name="l00079"></a>00079                                                                                                   &amp;gyro_calibration_cmd,
<a name="l00080"></a>00080                                                                                                   &amp;acc_calibration_cmd};
<a name="l00081"></a>00081 
<a name="l00082"></a>00082 
<a name="l00083"></a>00083 <span class="preprocessor">#endif </span><span class="comment">/* COMMANDS_H_ */</span>
<a name="l00084"></a>00084 
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 1 2011 15:06:32 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
